/*
  柯里化演示
*/
// function checkAge(min, age) {
//   return age >= min
// }

// console.log(checkAge(18, 20))

// function checkAge(min) {
//   return function (age) {
//     return age >= min
//   }
// }

const checkAge = (min) => (age) => age >= min

const checkAge18 = checkAge(18)
const checkAge20 = checkAge(20)

console.log(checkAge18(19))
console.log(checkAge20(19))
